package strategy;

/**
 * 执行策略
 */
public class ruleTest {

    public static void main(String[] args) {
        StrategyContext context1 = new StrategyContext(new FirstStrategy());
        context1.ruleExecute();

        StrategyContext context2 = new StrategyContext(new SecondStrategy());
        context2.ruleExecute();

        StrategyContext context3 = new StrategyContext(new ThirdStrategy());
        context3.ruleExecute();
    }
}
